from ronglian_sms_sdk import SmsSDK
from celery_tasks.main import celery_app


@celery_app.task(name='celery_send_sms_code')
def celery_send_sms_code(mobile, sms_code):
    # 发送短信验证码
    accId = '8a216da87e333212017e67ec8932098d'
    accToken = '34656006b7204478bd51f3eb482fc70a'
    appId = '8a216da87e333212017e67ec8a4e0994'

    sdk = SmsSDK(accId, accToken, appId)
    tid = '1'
    datas = (sms_code, '5')
    resp = sdk.sendMessage(tid, mobile, datas)
